{extend name="public/base" /}
{block name='nav'}
{/block}
{block name='body'}

<div class="layui-container-fluid fly-marginTop fly-user-main">
    <ul class="layui-nav layui-nav-tree layui-inline" id="audit-nav">
        <li class="layui-nav-item  layui-this">
            <a href="javascript:" title="{:url('audit/listRes')}">
                <i class="layui-icon">&#xe612;</i>
                审核资源
            </a>
        </li>
        <li class="layui-nav-item ">
            <a href="javascript:" title="{:url('audit/listCat')}">
                <i class="layui-icon">&#xe609;</i>
                分类管理
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:" title="{:url('audit/listResAll')}">
                <i class="layui-icon">&#xe620;</i>
                所有资源
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:" id="dbBackup">
                <i class="layui-icon">&#xe620;</i>
                数据库备份
            </a>
        </li>
    </ul>


    <div class="fly-panel fly-panel-user" style="padding: 5px;">
        <!--
        <div class="fly-msg" style="margin-top: 15px;">
          您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
        </div>
        -->
        <div class="layui-tab layui-tab-brief">
            <iframe id="right-content" src="{:url('audit/listRes')}" frameborder="0" width="100%"
                    height="666px"></iframe>
        </div>
    </div>
</div>
<script>
    layui.use(['layer', 'jquery'], function ()
    {
        let $ = layui.jquery, layer = layui.layer;
        $("#audit-nav a").click(function ()
        {
            let target = $(this).attr('title');
            $('#right-content').attr('src', target);
        });

        $("#dbBackup").click(function ()
        {
            $.get("{:url('audit/dbBackup')}", function (res)
            {
                layer.alert(res.errmsg);
            });
        });
    })
</script>
{/block}
{block name='footer'}
{/block}